﻿$(function () {
    $('button.username').click(function () {
        $.ajax({
            url: "../UpdateUserName",
            type: "post",
            data: {
                uid: $('.user-setting').attr('user'),
                un: $(this).parent().prev().children('input,texture').val()
            },
            success: function (data) {
                window.alert("修改成功");
            }
        });
    });
    $('button.nickname').click(function () {
        $.ajax({
            url: "../UpdateNickName",
            type: "post",
            data: {
                uid: $('.user-setting').attr('user'),
                un: $(this).parent().prev().children('input,texture').val()
            },
            success: function (data) {
                window.alert("修改成功");
            }
        });
    });
    $('button.pwd').click(function () {
        $.ajax({
            url: "../UpdatePWD",
            type: "post",
            data: {
                uid: $('.user-setting').attr('user'),
                pwd: $(this).parent().prev().children('input,textarea').val()
            },
            success: function (data) {
                window.alert("修改成功");
            }
        });
    });
    $('button.birth').click(function () {
        $.ajax({
            url: "../UpdateBirth",
            type: "post",
            data: {
                uid: $('.user-setting').attr('user'),
                bt: $(this).parent().prev().children('input,texture').val()
            },
            success: function (data) {
                window.alert("修改成功");
            }
        });
    });

    $('button.userdec').click(function () {
        $.ajax({
            url: "../UpdateDec",
            type: "post",
            data: {
                uid: $('.user-setting').attr('user'),
                bt: $(this).parent().prev().children('textarea').val()
            },
            success: function (data) {
                window.alert("修改成功");
            }
        });
    });
    $('button.pn').click(function () {
        $.ajax({
            url: "../UpdatePlayName",
            type: "post",
            data: {
                uid: $('.user-setting').attr('user'),
                c: $(this).parent().prev().children('input,textarea').val(),
                b: $('.qu').val()
            },
            success: function (data) {
                window.alert("修改成功");
            }
        });
    });
})